﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Pro_ContatChange.aspx.cs" Inherits="ArtLand.OA.Project.Project.Pro_ContatChange" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../js/jquery-1.4.1.min.js"></script>
    <style>
        .x-form-item {
            padding: 5px;
        }

        .mright {
            margin-right: 5px;
        }

        .datecontainer .x-form-field-trigger-wrap {
            margin-right: 5px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <ext:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
        <ext:Panel ID="Panel1" BodyPadding="10px" runat="server" EnableBackgroundColor="false"
            EnableCollapse="True" Title="面板" Width="600px" ShowHeader="false" ShowBorder="false" AutoScroll="true">
            <Toolbars>
                <ext:Toolbar Position="Footer" runat="server" ID="t1">
                    <Items>
                        <ext:Button Text="保存" Icon="DatabaseSave" ID="btnSave" ValidateForms="SimpleForm2" runat="server" OnClick="btnSave_Click"></ext:Button>
                        <ext:Button Text="关闭" Icon="SystemClose" ID="btnClose" runat="server"></ext:Button>
                        <ext:ToolbarSeparator></ext:ToolbarSeparator>
                        <ext:CheckBox runat="server" ID="CB_IsFinsh" Text="是否送货完成"></ext:CheckBox>
                    </Items>
                </ext:Toolbar>
            </Toolbars>
            <Items>
                <ext:SimpleForm ID="SimpleForm2" EnableBackgroundColor="false" ShowBorder="false" ShowHeader="false" Width="470px" BodyPadding="5px" Title="表单" runat="server">
                    <Items>
                        <ext:GroupPanel Title="合同关联信息">
                            <Items>
                                <ext:Panel ID="Panel2" ShowHeader="false" CssClass="x-form-item" ShowBorder="false"
                                    Layout="Column" runat="server">
                                    <Items>
                                        <ext:Label ID="Label3" runat="server" Width="60px" Text="合同编号：" CssClass="inline"></ext:Label>
                                        <ext:TextBox ID="txt_CONNUB" Label="合同编号" Required="true" runat="server" Width="160px" CssClass="mright" OnTextChanged="txt_CONNUB_TextChanged" AutoPostBack="true" />
                                        <ext:Label ID="Label8" Width="85px" runat="server" CssStyle="text-align: right" Text="合同日期："></ext:Label>
                                        <ext:DatePicker ID="txt_AddTime" runat="server" Label="合同日期" Required="true" Width="122px"></ext:DatePicker>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel ID="Panel9" ShowHeader="false" CssClass="x-form-item" ShowBorder="false"
                                    Layout="Column" runat="server">
                                    <Items>
                                        <ext:Label ID="Label2" runat="server" Width="60px" Text="合同描述：" CssClass="inline"></ext:Label>
                                        <ext:TextBox ID="txt_CONDES" Required="true" Label="合同描述" runat="server" Width="160px" CssClass="mright" />
                                        <ext:Label ID="Label12" Width="85px" runat="server" CssStyle="text-align: right" Text="计划交货日期："></ext:Label>
                                        <ext:DatePicker ID="txt_DLDATE" runat="server" Required="true" Width="122px"></ext:DatePicker>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel ID="Panel6" ShowHeader="false" CssClass="x-form-item" ShowBorder="false"
                                    Layout="Column" runat="server">
                                    <Items>
                                        <ext:Label ID="Label9" runat="server" Width="60px" Text="付款条件：" CssClass="inline"></ext:Label>
                                        <ext:TextBox runat="server" Required="true" ID="txt_PAYMET" Width="160px"></ext:TextBox>
                                       <%-- <ext:DropDownList runat="server" ID="Drp_PAYMET" Width="160px"></ext:DropDownList>--%>
                                        <ext:Label ID="Label10" runat="server" Text="交货地点：" Width="85px" CssStyle="text-align: right"></ext:Label>
                                        <ext:TextBox runat="server" Required="true" ID="txt_ADDRES"></ext:TextBox>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel ID="Panel7" ShowHeader="false" CssClass="x-form-item" ShowBorder="false"
                                    Layout="Column" runat="server">
                                    <Items>
                                        <ext:Label ID="Label11" runat="server" Width="60px" Text="项目编号：" CssClass="inline"></ext:Label>
                                        <ext:TriggerBox ID="txt_PRJNUB" Required="true" Width="160px" EnableEdit="false" ShowLabel="false" Readonly="false" TriggerIcon="Search" EmptyText="选择项目" runat="server">
                                        </ext:TriggerBox>
                                        <ext:HiddenField runat="server" ID="hid_PRJNUB"></ext:HiddenField>
                                        <ext:Label ID="Label14" runat="server" Width="85px" CssStyle="text-align: right" Text="客户编号："></ext:Label>
                                        <ext:TriggerBox ID="txt_CUTNUB" Required="true" Width="120px" EnableEdit="false" ShowLabel="false" Readonly="false" TriggerIcon="Search" EmptyText="选择客户" runat="server">
                                        </ext:TriggerBox>
                                        <ext:HiddenField runat="server" ID="hid_CUTNUB"></ext:HiddenField>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:GroupPanel>

                        <ext:GroupPanel Title="合同金额信息">
                            <Items>
                                <ext:Panel ID="Panel3" ShowHeader="false" CssClass="x-form-item" ShowBorder="false"
                                    Layout="Column" runat="server">
                                    <Items>
                                        <ext:Label ID="Label4" runat="server" Width="75px" Text="不含税总额：" CssClass="inline"></ext:Label>
                                        <ext:NumberBox ID="txt_TAMOUT" runat="server" Width="145px" CssClass="mright" Text="0" />
                                        <ext:Label ID="Label7" runat="server" Width="75px" Text="合同总金额：" CssClass="inline"></ext:Label>
                                        <ext:NumberBox runat="server" ID="txt_AMOUNT" Width="135px" Text="0"></ext:NumberBox>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel ID="Panel5" ShowHeader="false" CssClass="x-form-item" ShowBorder="false"
                                    Layout="Column" runat="server">
                                    <Items>
                                        <ext:Label ID="Label5" runat="server" Text="是否含税"></ext:Label>
                                        <ext:CheckBox runat="server" ID="CB_CHKTAX" CssClass="mright" AutoPostBack="true" OnCheckedChanged="CHK_TAX_CheckedChanged"></ext:CheckBox>
                                        <ext:Label ID="Label6" runat="server" Text="税率："></ext:Label>
                                        <ext:DropDownList runat="server" Width="50px" Enabled="false" ID="Drp_PERTAX" AutoPostBack="true" OnSelectedIndexChanged="Drp_PERTAX_SelectedIndexChanged"></ext:DropDownList>
                                        <ext:NumberBox Hidden="true" runat="server" ID="txt_PERTAX" Text="17" Width="50px" Enabled="false"></ext:NumberBox>
                                        <ext:Label ID="Label13" runat="server" Text="%"></ext:Label>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:GroupPanel>
                        <ext:GroupPanel Title="其他信息" EnableCollapse="true">
                            <Items>

                                <ext:Panel ID="Panel4" ShowHeader="false" CssClass="x-form-item" ShowBorder="false"
                                    Layout="Column" runat="server">
                                    <Items>
                                        <ext:Label ID="Label1" runat="server" Width="65px" Text="备注说明：" CssClass="inline"></ext:Label>

                                        <ext:TextArea ID="txt_REMARK" runat="server" Width="350px"></ext:TextArea>
                                    </Items>
                                </ext:Panel>
                                
                            </Items>
                        </ext:GroupPanel>
                        <ext:Grid runat="server" ID="Grid1" Height="170px" OnRowDataBound="Grid1_RowDataBound" Title="合同原件附件" OnRowCommand="Grid1_RowCommand" AutoScroll="true" ShowHeader="true" EnableRowNumber="true" >
                                    <Toolbars>
                                        <ext:Toolbar ID="Toolbar1" CssClass="mytoolbar" runat="server">
                                            <Items>
                                                <ext:FileUpload runat="server" ID="filePhoto" ButtonText="上传附件" ButtonOnly="true"
                                                    AutoPostBack="true" ButtonIcon="DiskUpload" OnFileSelected="filePhoto_FileSelected" Width="77px" Height="20px">
                                                </ext:FileUpload>
                                            </Items>
                                        </ext:Toolbar>
                                    </Toolbars>
                                    <Columns>
                                        <ext:BoundField DataField="FileName" Width="370px" HeaderText="文件名" />
                                        <ext:BoundField DataField="FileName" Width="250px" HeaderText="文件名" Hidden="true" />
                                        <ext:LinkButtonField ConfirmText="你确定要这么做么？" ConfirmTarget="Top" Icon="Decline" ColumnID="ID"
                                            Width="50px" CommandName="Del" TextAlign="Center" HeaderText="删除" />
                                    </Columns>
                                </ext:Grid>
                    </Items>
                </ext:SimpleForm>

                <%--<ext:GroupPanel ID="GroupPanel2" EnableBackgroundColor="true" AutoHeight="true" Title="查看权限"
                    runat="server">
                    <Items>
                    </Items>
                </ext:GroupPanel>--%>
            </Items>
        </ext:Panel>
        <ext:Button runat="server" ID="Button3" OnClick="Button3_Click"></ext:Button>
        <ext:Button runat="server" ID="Button1" OnClick="Button1_Click"></ext:Button>
        <ext:Button runat="server" ID="Button2" OnClick="Button2_Click"></ext:Button>
        <ext:HiddenField ID="hf" runat="server"></ext:HiddenField>
         <ext:Window ID="Window1" Title="编辑" Popup="false" EnableIFrame="true" runat="server" EnableConfirmOnClose="true" IFrameUrl="about:blank"
            Target="Top" IsModal="True" Width="500px" Height="400px" OnClose="Window1_Close">
        </ext:Window>
    </form>
    <script src="../js/extgridbug.js"></script>
    <style>
        .x-form-check-wrap input {
            vertical-align: text-top;
        }
    </style>
    <script>

        function ClearProj()
        {
            var p = '<%=txt_PRJNUB.ClientID%>';
            $("#" + p).val('');
        }

        function onReady() {
            var textbox1ID = '<%=txt_PERTAX.ClientID %>';
            $("#" + textbox1ID).keydown(function () {
                X.disable('Button1');
                __doPostBack('Button1', '');

                // 这里可以写些验证代码
            });
            var textbox2ID = '<%=txt_AMOUNT.ClientID %>';
            $("#" + textbox2ID).keydown(function () {
                X.disable('Button2');
                __doPostBack('Button2', '');

                // 这里可以写些验证代码
            });

            var textbox3ID = '<%=txt_TAMOUT.ClientID %>';
            $("#" + textbox3ID).keydown(function () {
                X.disable('Button3');
                __doPostBack('Button3', '');

                // 这里可以写些验证代码
            });

        }
    </script>
</body>
</html>
